namespace Specifications.Views
{
    using Caliburn.Testability;
    using ChumChase;
    using ChumChase.Model;
    using NUnit.Framework;
    using NUnit.Framework.SyntaxHelpers;

    [TestFixture]
    public class The_shell : BindingsTestBase
    {
        private readonly ValidationResult<ApplicationModel> bindings;

        public The_shell()
        {
            bindings = Validator.For<Shell, ApplicationModel>()
                .Validate();
        }

        [Test]
        public void does_not_have_binding_errors()
        {
            Assert.That(bindings.HasErrors, Is.False, bindings.ErrorSummary);
        }

        [Test]
        public void is_bound_to_the_current_presenter()
        {
            Assert.That(bindings.WasBoundTo(x => x.CurrentPresenter));
        }
    }
}